home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
unix
/
ch20
/
20fig10.wrl
< prev
next >
Wrap
Text File
|
1996-09-23
|
2KB
|
65 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright [1997] By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Generic lighting for ambience
DirectionalLight {
intensity 0.2
ambientIntensity 1.0
},
# Light bulb
DEF BulbLight PointLight {
radius 16.0
color 1.0 0.0 0.0
},
# Light bulb shape
Shape {
appearance Appearance {
material DEF BulbColor Material {
emissiveColor 1.0 0.3 0.3
diffuseColor 0.0 0.0 0.0
}
}
geometry DEF Bulb Sphere { }
},
# Wall
Transform {
translation 0.0 0.0 -1.1
rotation 1.0 0.0 0.0 1.57
children Inline { url "mesh.wrl" }
},
# Animation clock
DEF Clock TimeSensor {
cycleInterval 4.0
loop TRUE
},
# Animation brightness and colors
DEF BulbIntensity ScalarInterpolator {
key [ 0.0, 0.5, 0.5, 1.0 ]
keyValue [ 1.0, 1.0, 0.0, 0.0 ]
},
DEF BulbDiffuse ColorInterpolator {
key [ 0.0, 0.5, 0.5, 1.0 ]
keyValue [
0.0 0.0 0.0, 0.0 0.0 0.0,
1.0 0.3 0.3, 1.0 0.3 0.3
]
},
DEF BulbEmissive ColorInterpolator {
key [ 0.0, 0.5, 0.5, 1.0 ]
keyValue [
1.0 0.3 0.3, 1.0 0.3 0.3,
0.0 0.0 0.0, 0.0 0.0 0.0,
]
}
]
}
ROUTE Clock.fraction_changed TO BulbIntensity.set_fraction
ROUTE Clock.fraction_changed TO BulbDiffuse.set_fraction
ROUTE Clock.fraction_changed TO BulbEmissive.set_fraction
ROUTE BulbIntensity.value_changed TO BulbLight.set_intensity
ROUTE BulbDiffuse.value_changed TO BulbColor.set_diffuseColor
ROUTE BulbEmissive.value_changed TO BulbColor.set_emissiveColor